home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 November / Ahoy_Magazine_86-11_1986_Double_L.d64 / Date Ditty 2 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  636b  |  18 lines

  1. 0 print"[147]":poke53280,6:poke53281,1:poke646,0
  2. 1 print" commodares....date ditty #2 ":print:print
  3. 2 rem     date ditty
  4. 3 rem solution by
  5. 4 rem     karen middaugh
  6. 5 rem
  7. 10 dim k(12):for i=1 to 7:read d$(i):next:for i=1 to 12:read k(i):next
  8. 20 input "input year: 19";y
  9. 30 input"input month (1-12): ";m :if m<1 or m>12 then 30
  10. 40 input "input day: ";d :if m=2 and d>28 and (y/4<>int(y/4) or y=0) then 40
  11. 50 if (m=4 or m=6 or m=9 or m=11) and d>30 then 40
  12. 60 if d<1 or d>31 or (m=2 and d>29) then 40
  13. 70 l=int((y+3)/4):da=6+y+l+k(m)+d :if int(y/4)=y/4 and m>2 then da=da+1
  14. 75 if y=0 and m<3 then da=da+1
  15. 80 if da>7 then da=da-7 :goto 80
  16. 90 print m"/"d"/"y" is a "d$(da)"day"
  17. 100 data mon,tues,wednes,thurs,fri,satur,sun,0,3,3,6,1,4,6,2,5,7,3,5
  18.